<template>
  <a-card :title="'用户信息 - ' + data.test">
    {{ store.user }}
  </a-card>
</template>

<script setup>
import { onMounted, reactive } from 'vue'
import { Message } from '@arco-design/web-vue'
import { useCommonStore } from '@/stores/common'
import gmapi from '@/api/gmapi'

const store = useCommonStore()

const data = reactive({
  test: ''
})

onMounted(() => {
  gmapi
    .test()
    .then((res) => {
      if (res.code == 0) {
        data.test = res.message
      } else {
        Message.error(res.message)
      }
    })
    .catch((err) => {
      console.log(err)
      Message.error('接口test出错')
    })
})
</script>

<style scoped></style>
